export const urls = new Map(), GET = new Map(), POST = new Map(), PUT = new Map(), DELETE = new Map();
urls.set('get', GET), urls.set('post', POST), urls.set('put', PUT), urls.set('delete', DELETE);

const ip = "http://base.kingborn.org:27002";
// const ip = "http://192.168.11.100";

const apiUrl = process.env.NODE_ENV == "development" ? "/api" : `${ip}/auth-admin/`;
const apiJztUrl = process.env.NODE_ENV == "development" ? "/apijzt" : `${ip}/citydew-filesystem/`;
const apiuserNUrl = process.env.NODE_ENV == "development" ? "/userN" : `${ip}/auth-resource/`;
GET.set('getLeftMenu', './static/json/leftMenu.json');
// GET.set('getLeftMenu', './static/json/leftMenuConfig.json');



// pass: 后端接口没有restful 全是post

// ---------------------------------------------------POST--------------------------------------------------

POST.set('login', `${apiUrl}/pwdLogin`);  // 登陆

// -----------------------------------角色管理--------------------------------------------
POST.set('getRoleList', `${apiUrl}/role/getRoleList`); // 获取角色列表
POST.set('getSaveRole', `${apiUrl}/role/saveRole`); // 新增保存角色
POST.set('getDeleteRole', `${apiUrl}/role/deleteRole`); // 删除角色
POST.set('getUpdateRole', `${apiUrl}/role/updateRole`); // 修改保存角色

// --------------------------------------应用管理---------------------------------------------
POST.set('getAppList', `${apiUrl}/client/getClient`); // 获取应用列表
POST.set('getSaveClient', `${apiUrl}/client/saveClient`); // 新增保存应用
POST.set('getUpdateClient', `${apiUrl}/client/updateClient`); // 更新保存应用
POST.set('getDeleteClient', `${apiUrl}/client/deleteClient`); // 删除应用
// POST.set('getAppList', `${apiUrl}/customClientDetails`); // 获取应用列表
// POST.set('getFindAppByName', `${apiUrl}/findClientByServicename`); // 获取应用列表
// POST.set('findClientByName', `${apiUrl}/findClientByName`); // 应用模糊查询


// ---------------------------------------------字典管理------------------------------

POST.set('getDict', `${apiUrl}/dict/getDictList`); // 获取字典列表
POST.set('getSaveDict', `${apiUrl}/dict/saveDict`); // 新增字典
POST.set('getDeleteDict', `${apiUrl}/dict/deleteDict`); // 删除字典列表
// POST.set('getDictByDataCode', `${apiUrl}/dict/getDictByDataCode`); // 字典查询


// -----------------------------------------用户管理-------------------------------------------
POST.set('getUserList', `${apiUrl}/user/getUserList`); // 获取用户列表


POST.set('getSaveUser', `${apiUrl}/user/saveUser`); // 获取用户列表
POST.set('getUpdateUser', `${apiUrl}/user/updateUser`); // 修改用户
POST.set('getDeleteUser', `${apiUrl}/user/deleteUser`); // 删除用户
// POST.set('getUpdateUser', `${apiUrl}/user/updateUser`); // 用户查询

POST.set('getFindRolesByUser', `${apiUrl}/role/getRolesByUserId`); // 用户id查角色
POST.set('getFindAccountByID', `${apiUrl}/account/getAccountByUserId`); // 用户id查账户
POST.set('getUserAddRoles', `${apiUrl}/user/addRoles`); // 用户id查角色

POST.set('getSaveAccount', `${apiUrl}/account/saveAccount`); // 添加账户
POST.set('getDeleteAccount', `${apiUrl}/account/deleteAccount`); // 删除账户
POST.set('getUpdateAccount', `${apiUrl}/account/updateAccount`); // 修改账户


// -------------------------------------岗位--------------------------------------

POST.set('getAllPosition', `${apiUrl}/position/getPositionList`); // 获取岗位列表
// POST.set('getPosition', `${apiUrl}/position/getPosition`); //根据id 获取岗位列表
POST.set('getSavePosition', `${apiUrl}/position/savePosition`); //新增岗位
POST.set('getUpdatePosition', `${apiUrl}/position/updatePosition`); //修改岗位
POST.set('getDeletePosttion', `${apiUrl}/position/deletePosttion`); //删除岗位



// ---------------------------------------菜单管理------------------------------------------
POST.set('getMenuFind', `${apiUrl}/activity/getActivityListByTree`); // 根据类型获取菜单
POST.set('getSaveActivityNew', `${apiUrl}/activity/saveActivityNew`); // 新增菜单  顶级菜单 pid: 0 ，子菜单 pid: 父菜单id
POST.set('getUpdateActivity', `${apiUrl}/activity/updateActivity`); // 修改菜单
POST.set('getDeleteActivity', `${apiUrl}/activity/deleteActivity`); // 删除菜单
POST.set('getQueryActivityByRole', `${apiUrl}/activity/queryActivityByRoleAndTypeByTree`); // 根据角色获取菜单权限
POST.set('getFindActivitisByTypeeAndClientId', `${apiUrl}/activity/getActivityListByTree`); // 根据应用Id，类型获取菜单

// ---------------------------------角色权限--------------------------
POST.set('getSaveActivityToRole', `${apiUrl}/activity/saveActivityToRole`); // 权限配置保存
POST.set('getQueryActivityByRoleAAndTypeNoTree', `${apiUrl}/activity/queryActivityByRoleAndType`); // 权限配置获取


// ---------------------------------------组织-------------------------------
POST.set('getOrgFindAll', `${apiUrl}/org/getOrgListByTree`); // 获取组织列表
POST.set('getSaveOrg', `${apiUrl}/org/saveOrg`); // 新增顶级组织列表
POST.set('getDeleteOrg', `${apiUrl}/org/deleteOrg`); // 删除组织列表
POST.set('getUpdateOrg', `${apiUrl}/org/updateOrg`); // 修改组织列表














// -------------------------------------------运营管理--------------------------
POST.set('getVisi', `${apiUrl}/visit/getVisi`); // 获取组织列表

// --------------------------------------------文件管理----------------------------------
POST.set('getFile', `${apiJztUrl}/select`); // 搜索文件
POST.set('getDeleteFile', `${apiJztUrl}/deleteFile`); // 删除文件
POST.set('getDownload', `${apiJztUrl}/download`); // 下载文件
// ----------------------------------------------文件查找-----------------------------------
POST.set('getHdfs', `${apiJztUrl}/getHdfs`); // 文件查找
POST.set('upload', `${ip}/citydew-filesystem/upload`); // 文件查找


// ---------------------------------------根据access_token获取用户名------

GET.set('getUserN', `${apiuserNUrl}/user`);

// async function  s(){
//     this.Listname = await _https.GET.testGet({})
// }

